home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 65.zip / BS1 part 65 / DevPac v3.02b.adf / include / devices / prtbase.i < prev    next >
Text File  |  1991-11-20  |  6KB  |  170 lines

  1.     IFND    DEVICES_PRTBASE_I
  2. DEVICES_PRTBASE_I    SET    1
  3. **
  4. **    $Filename: devices/prtbase.i $
  5. **    $Release: 1.3 $
  6. **
  7. **    printer device data definition 
  8. **
  9. **    (C) Copyright 1986,1987,1988 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. **
  12.  
  13.    IFND     EXEC_NODES_I
  14.    INCLUDE  "exec/nodes.i"
  15.    ENDC
  16.    IFND     EXEC_LISTS_I
  17.    INCLUDE  "exec/lists.i"
  18.    ENDC
  19.    IFND     EXEC_PORTS_I
  20.    INCLUDE  "exec/ports.i"
  21.    ENDC
  22.    IFND     EXEC_LIBRARIES_I
  23.    INCLUDE  "exec/libraries.i"
  24.    ENDC
  25.    IFND     EXEC_TASKS_I
  26.    INCLUDE  "exec/tasks.i"
  27.    ENDC
  28.  
  29.    IFND     DEVICES_PARALLEL_I
  30.    INCLUDE  "devices/parallel.i"
  31.    ENDC
  32.    IFND     DEVICES_SERIAL_I
  33.    INCLUDE  "devices/serial.i"
  34.    ENDC
  35.    IFND     DEVICES_TIMER_I
  36.    INCLUDE  "devices/timer.i"
  37.    ENDC
  38.    IFND     LIBRARIES_DOSEXTENS_I
  39.    INCLUDE  "libraries/dosextens.i"
  40.    ENDC
  41.    IFND     INTUITION_INTUITION_I
  42.    INCLUDE  "intuition/intuition.i"
  43.    ENDC
  44.  
  45.  
  46.  STRUCTURE  DeviceData,LIB_SIZE
  47.     APTR dd_Segment          ; A0 when initialized
  48.     APTR dd_ExecBase          ; A6 for exec
  49.     APTR dd_CmdVectors          ; command table for device commands
  50.     APTR dd_CmdBytes          ; bytes describing which command queue
  51.     UWORD   dd_NumCommands    ; the number of commands supported
  52.     LABEL   DeviceData_SIZEOF ; (was dd_SIZEOF)
  53.  
  54.  
  55. *------
  56. *------ device driver private variables ------------------------------
  57. *------
  58. du_Flags EQU   LN_PRI          ; various unit flags
  59.  
  60. ;------ IO_FLAGS
  61.     BITDEF  IO,QUEUED,4          ; command is queued to be performed
  62.     BITDEF  IO,CURRENT,5      ; command is being performed
  63.     BITDEF  IO,SERVICING,6    ; command is being actively performed
  64.     BITDEF  IO,DONE,7          ; command is done
  65.  
  66. ;------ du_Flags
  67.     BITDEF  DU,STOPPED,0      ; commands are not to be performed
  68.  
  69.  
  70. *------ Constants ----------------------------------------------------
  71. P_PRIORITY    EQU    0
  72. P_STKSIZE    EQU    $0800    ; stack size for child task
  73. P_BUFSIZE    EQU    256    ; size of internal buffers for text i/o
  74. P_SAFESIZE    EQU    128    ; safety margin for text output buffer
  75.  
  76. *------ pd_Flags ------
  77.    BITDEF   P,IOR0,0          ; IOR0 is in use
  78.    BITDEF   P,IOR1,1          ; IOR1 is in use
  79.    BITDEF   P,EXPUNGED,7      ; device to be expunged when all closed
  80.  
  81.  STRUCTURE  PrinterData,DeviceData_SIZEOF
  82.     STRUCT  pd_Unit,MP_SIZE   ; the one and only unit
  83.     BPTR pd_PrinterSegment    ; the printer specific segment
  84.     UWORD   pd_PrinterType    ; the segment printer type
  85.     APTR pd_SegmentData          ; the segment data structure
  86.     APTR pd_PrintBuf          ; the raster print buffer
  87.     APTR pd_PWrite          ; the parallel write function
  88.     APTR pd_PBothReady          ; the parallel write function's done
  89.  
  90.     IFGT IOEXTPar_SIZE-IOEXTSER_SIZE
  91.     STRUCT  pd_IOR0,IOEXTPar_SIZE   ; port I/O request 0
  92.     STRUCT  pd_IOR1,IOEXTPar_SIZE   ;    and 1 for double buffering
  93.     ENDC
  94.  
  95.     IFLE IOEXTPar_SIZE-IOEXTSER_SIZE
  96.     STRUCT  pd_IOR0,IOEXTSER_SIZE   ; port I/O request 0
  97.     STRUCT  pd_IOR1,IOEXTSER_SIZE   ;    and 1 for double buffering
  98.     ENDC
  99.  
  100.     STRUCT  pd_TIOR,IOTV_SIZE        ; timer I/O request
  101.     STRUCT  pd_IORPort,MP_SIZE        ;    and message reply port
  102.     STRUCT  pd_TC,TC_SIZE        ; write task
  103.     STRUCT  pd_Stk,P_STKSIZE        ;    and stack space
  104.     UBYTE   pd_Flags            ; device flags
  105.     UBYTE   pd_pad
  106.     STRUCT  pd_Preferences,pf_SIZEOF ; the latest preferences
  107.     UBYTE      pd_PWaitEnabled        ; wait function switch
  108.     LABEL   pd_SIZEOF            ; warning! this may be odd
  109.  
  110.     BITDEF  PPC,GFX,0        ;graphics (bit position)
  111.     BITDEF  PPC,COLOR,1        ;color (bit position)
  112.  
  113. PPC_BWALPHA    EQU    $00    ;black&white alphanumerics
  114. PPC_BWGFX    EQU    $01    ;black&white graphics
  115. PPC_COLORALPHA    EQU    $02    ;color alphanumerics
  116. PPC_COLORGFX    EQU    $03    ;color graphics
  117.  
  118. PCC_BW        EQU    1    ;black&white only
  119. PCC_YMC        EQU    2    ;yellow/magenta/cyan only
  120. PCC_YMC_BW    EQU    3    ;yellow/magenta/cyan or black&white
  121. PCC_YMCB    EQU    4    ;yellow/magenta/cyan/black
  122.  
  123. PCC_4COLOR    EQU    $4    ;a flag for YMCB and BGRW
  124. PCC_ADDITIVE    EQU    $8    ;not ymcb but blue/green/red/white
  125. PCC_WB        EQU    $9    ;black&white only, 0 == BLACK
  126. PCC_BGR        EQU    $a    ;blue/green/red
  127. PCC_BGR_WB    EQU    $b    ;blue/green/red or black&white
  128. PCC_BGRW    EQU    $c    ;blue/green/red/white
  129. ;    The picture must be scanned once for each color component, as the
  130. ;    printer can only define one color at a time.  ie. If 'PCC_YMC' then
  131. ;    first pass sends all 'Y' info to printer, second pass sends all 'M'
  132. ;    info, and third pass sends all C info to printer.  The CalComp
  133. ;    PlotMaster is an example of this type of printer.
  134. PCC_MULTI_PASS    EQU    $10    ;see explanation above
  135.  
  136.  STRUCTURE  PrinterExtendedData,0
  137.     APTR    ped_PrinterName   ; printer name, null terminated
  138.     APTR    ped_Init          ; called after LoadSeg
  139.     APTR    ped_Expunge          ; called before UnLoadSeg
  140.     APTR    ped_Open          ; called at OpenDevice
  141.     APTR    ped_Close          ; called at CloseDevice
  142.     UBYTE   ped_PrinterClass  ; printer class
  143.     UBYTE   ped_ColorClass    ; color class
  144.     UBYTE   ped_MaxColumns    ; number of print columns available
  145.     UBYTE   ped_NumCharSets   ; number of character sets
  146.     UWORD   ped_NumRows          ; number of 'pins' in print head
  147.     ULONG   ped_MaxXDots      ; number of dots maximum in a raster dump
  148.     ULONG   ped_MaxYDots      ; number of dots maximum in a raster dump
  149.     UWORD   ped_XDotsInch     ; horizontal dot density
  150.     UWORD   ped_YDotsInch     ; vertical dot density
  151.     APTR    ped_Commands      ; printer text command table
  152.     APTR    ped_DoSpecial     ; special command handler
  153.     APTR    ped_Render          ; raster render function
  154.     LONG    ped_TimeoutSecs   ; good write timeout
  155. ;------ the following only exists if the segment version is 33 or greater
  156.     APTR     ped_8BitChars    ;conversion strings for the extended font
  157.     LONG     ped_PrintMode    ;set if text printed, otherwise 0
  158. ;------ the following only exists if the segment version is 34 or greater
  159.     APTR    ped_ConvFunv    ; ptr to conversion function for all chars
  160.     LABEL    ped_SIZEOF
  161.  
  162.  STRUCTURE  PrinterSegment,0
  163.     ULONG   ps_NextSegment    ; (actually a BPTR)
  164.     ULONG   ps_runAlert          ; MOVEQ #0,D0 : RTS
  165.     UWORD   ps_Version          ; segment version
  166.     UWORD   ps_Revision          ; segment revision
  167.     LABEL   ps_PED          ; printer extended data
  168.  
  169.     ENDC    ; DEVICES_PRTBASE_I
  170.